package cn.home.sysmanagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.sysmanagement.mapper.HomeDoctorTeamMapper;
import cn.home.sysmanagement.domain.HomeDoctorTeam;
import cn.home.sysmanagement.service.IHomeDoctorTeamService;

/**
 * 医生-团队Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-10
 */
@Service
public class HomeDoctorTeamServiceImpl implements IHomeDoctorTeamService 
{
    @Autowired
    private HomeDoctorTeamMapper homeDoctorTeamMapper;

    /**
     * 查询医生-团队
     * 
     * @param doctorId 医生-团队主键
     * @return 医生-团队
     */
    @Override
    public HomeDoctorTeam selectHomeDoctorTeamByDoctorId(Long doctorId)
    {
        return homeDoctorTeamMapper.selectHomeDoctorTeamByDoctorId(doctorId);
    }

    @Override
    public List<HomeDoctorTeam> selectHomeDoctorTeamByTeamId(Long teamId) {
        return homeDoctorTeamMapper.selectHomeDoctorTeamByTeamId(teamId);
    }

    /**
     * 查询医生-团队列表
     * 
     * @param homeDoctorTeam 医生-团队
     * @return 医生-团队
     */
    @Override
    public List<HomeDoctorTeam> selectHomeDoctorTeamList(HomeDoctorTeam homeDoctorTeam)
    {
        return homeDoctorTeamMapper.selectHomeDoctorTeamList(homeDoctorTeam);
    }

    /**
     * 新增医生-团队
     * 
     * @param homeDoctorTeam 医生-团队
     * @return 结果
     */
    @Override
    public int insertHomeDoctorTeam(HomeDoctorTeam homeDoctorTeam)
    {
        return homeDoctorTeamMapper.insertHomeDoctorTeam(homeDoctorTeam);
    }

    /**
     * 修改医生-团队
     * 
     * @param homeDoctorTeam 医生-团队
     * @return 结果
     */
    @Override
    public int updateHomeDoctorTeam(HomeDoctorTeam homeDoctorTeam)
    {
        return homeDoctorTeamMapper.updateHomeDoctorTeam(homeDoctorTeam);
    }

    /**
     * 批量删除医生-团队
     * 
     * @param doctorIds 需要删除的医生-团队主键
     * @return 结果
     */
    @Override
    public int deleteHomeDoctorTeamByDoctorIds(Long[] doctorIds)
    {
        return homeDoctorTeamMapper.deleteHomeDoctorTeamByDoctorIds(doctorIds);
    }

    /**
     * 删除医生-团队信息
     * 
     * @param doctorId 医生-团队主键
     * @return 结果
     */
    @Override
    public int deleteHomeDoctorTeamByDoctorId(Long doctorId)
    {
        return homeDoctorTeamMapper.deleteHomeDoctorTeamByDoctorId(doctorId);
    }

    @Override
    public List<HomeDoctorTeam> selectHomeDoctorTeamByTeamId2(Long teamId) {
        return homeDoctorTeamMapper.selectHomeDoctorTeamByTeamId2(teamId);
    }
}
